package com.xinxin.leetcode.problem441;

/**
 * @author ShiXinXin
 * @date 2019-12-16 15:56
 */
class Solution {
    public int arrangeCoins(int n) {
        return (int)(Math.sqrt(1 + 8 * (long)n) - 1) / 2;
    }

    public static void main(String[] args) {
        System.out.println(new Solution().arrangeCoins(1804289383));
    }
}
